package com.xiaoge.utils;

import com.xiaoge.entity.Person;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.HashMap;

/**
 * 返回响应数据封装
 */
public class ResponseDataUtil {

    public static ResData successData(HashMap<String,Object> map){
        return new ResData(map,"成功",200);
    }

    public static ResData error(){
        return new ResData(new HashMap<>(),"失败",500);
    }

    public static ResData success(){
        return new ResData(new HashMap<>(),"成功！",200);
    }
}
